<template>
    <div class="Search">
        <!-- 搜索 -->
        <!-- <div style="width: 2rem;"> -->
            <van-search v-model="value" show-action placeholder="请输入搜索关键词" @search="onSearch" @cancel="onCancel" />
        <!-- </div> -->
        <router-view></router-view>
    </div>
</template>

<script>
export default {
    data() {
        return {
            value: "",
        };
    },

    methods: {
        onSearch() {
            // console.log(222);
            this.$router.push('/search/key'+this.value)
            
        },
        onCancel() {
            // console.log(111);
            this.$router.push('/')
        },
        
        submit(){
        }
    },
};
</script>

<style lang="scss" scoped>
.Search {
    padding: 0.28rem;
    .van-search {
        .van-cell {
            line-height: 0.5rem;
            font-size: 0.22rem;
        }
        .van-search__action {
            font-size: 0.26rem;
        }
    }
}
</style>